home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CICA Windows Explosion!
/
The CICA Windows Explosion! - Disc 2.iso
/
nt
/
ntcrn1.zip
/
NTCROND.DOC
< prev
next >
Wrap
Text File
|
1994-11-25
|
19KB
|
421 lines
--------------------------------------------------------------------------
Windows NT "ntcrond" Version 1.0 A2
--------------------------------------------------------------------------
This file contains the following sections:
1. ntcrond Description and Background
2. Reporting Problems or Suggestions
3. System Requirements
4. Installation
5. Usage
6. Known Bugs and Limitations
7. Changes from Previous Versions
8. Planned Enhancements
9. Legal Restrictions
--------------------------------------------------------------------------
1. Description and Background
ntcrond is a Microsoft Windows NT service that emulates the crond utility
developed by AT&T and Hewlett Packard for UNIX. It allows Windows NT
users to execute commands at specified dates and times, using "crontab"
files identical to those used by the UNIX version of crond. Unlike other
shareware crond emulators, ntcrond runs completely as a Windows NT
service, and utilizes the user-level security architecture of Windows NT.
If a user account does not normally have access to a file, command or
operation, it won't have it using ntcrond either. Additionally,
ntcrond only looks at crontab files during service startup, and when a
crontab file changes. This is to reduce the overhead of checking for
new or changed files every so often. And, no, it's not in a "while"
loop that will drain your CPU! Also, ntcrond achieves outstanding
performance gains by using multiple threads for multiple processes,
resulting in near instantaneous execution of many processes that are
scheduled to execute at the same time.
ntcrond was developed primarily because of (1) the lack of such a
service for Windows NT, and (2) the "AT" service provided by Microsoft
was too much of a pain to deal with for commands that needed to run
every 5 minutes, et cetera. . . .
ntcrond was developed using Microsoft Visual C/C++ 2.0, several UNIX
manuals, and several gallons of coffee.
--------------------------------------------------------------------------
2. Reporting Problems or Suggestions
The best way to contact Extreme Software is to send E-Mail to
gparsons@dfw.net (no X.400 please!)
ntcrond is not "crippleware". Rather, it is the same fully functional
version that we at Extreme Software use every day on multiple machines.
However, if you wish to register your copy of ntcrond with Extreme
Software, you may send $25.00 (U.S. please) to the below address.
You won't get a fancy bound manual, but you WILL get support, and help
fund future Extreme Software development projects. If you like the
product, PLEASE let us know! Any feedback is appreciated -- negative
or otherwise. We can not, and will not make further enhancements
to ntcrond without your support.
If you have questions or problems with ntcrond, we may already be aware
of them, or already have a fix for them. Please check the "Known Bugs
and Limitations" section of this document.
Our mailing address is:
Extreme Software
2900 North 22nd Street, #P1
Rogers, AR 72756
USA
Commercial licenses are available from Extreme Software. Please contact
the above address, or send email to gparsons@dfw.net for pricing
information for commercial use.
--------------------------------------------------------------------------
3. System Requirements
To use ntcrond, your system needs the following:
Windows NT 3.5 or later
Acceptable hardware configuration to run Windows NT 3.5
100 KB of hard disk space
Note: To improve performance, ntcrond loads all crontabs into memory, so
any additional RAM will improve performance - i.e., prevent the
Windows NT subsystems from excessive disk I/O as a result of
paging.
Note: Many of the security features of ntcrond depend upon the inherent
security of the Windows NT NTFS file system. Although ntcrond
will work, many of the security "hooks" will not. These are
listed below where they apply.
--------------------------------------------------------------------------
4. Installation
Installation of ntcrond is relatively painless. If you retrieved the
ntcrond.zip, you must first use PKUNZIP (c) or an equivalent to unzip
the package. The files in this release of ntcrond are:
ntcrond.exe -- the Windows NT service
ntcrond.doc -- this document
install.cmd -- a VERY simple installtion script
Ideally, you would want to install ntcrond in the %SystemRoot%\system32
directory where most of the other Windows NT services are located. But,
there is no restriction on the actual location. Note that the
install.cmd file creates two directories when it is run. This is the
default. (If you wish to place the crontab files elsewhere, feel free,
but you'll also have to change some registry entries...)
If you have a previous version of ntcrond installed, you should remove
it from your services entry table by typing:
ntcrond -remove
This should stop the ntcrond service, and remove it from the services
table. At this point, you can run the "install.cmd" to reinstall
the newest version.
By default, the first time ntcrond is run, it creates a couple
of entries in the registry under HKEY_LOCAL_MACHINE. To be precise,
these are in:
SYSTEM\CurrentControlSet\Services\ntcrond
The key values are:
AllowDenyPath: %SystemRoot%\cron\
CronTabsPath: %SystemRoot%\cron\crontabs
Unless you change these registry entries, ntcrond will look in those
directories for the "cron.allow | cron.deny" and all user crontabs.
Note that the AllowDenyPath key value has no meaning in this Alpha
version of ntcrond. (See section: Known Bugs and Limitations)
If you type ntcrond from a command line without any parameters, you will
see the following:
Extreme Software, ntcrond 1.0 A2 (c) 1994 - All rights reserved
---------------------------------------------------------------
ntcrond -install to install the service
ntcrond -stop to stop the service
ntcrond -remove to stop AND remove the service
As indicated above, typing "ntcrond -install" will install ntcrond
in the Windows NT available service registry. At this point, simply
open the Control Panel applet, double click on the Services icon,
and the ntcrond entry should appear in your service list. To start the
ntcrond service, simply click on the [Start] button.
Note that when ntcrond runs, it is running as if it were logged in
as the "supreme" administrator account. Therefore, it has no
restrictions on directories, or files. However, before any line
of any crontab file is run, it is assigned a Security Descriptor
(see your Windows NT programming references) that matches that of
the "owner" of the crontab file. So, if a user account does not
have access to a particular directory, service or file, the
command will not run.
Congratulations, you now have a cron service for Windows NT, and are
ready to begin scheduling tasks!
--------------------------------------------------------------------------
5. Usage
The key to successfully using ntcrond, is the creation and management
of "crontab" files, or the scripts that ntcrond uses to run your
scheduled tasks. The crontab file names are the same as the valid
account names on your Windows NT machine. For example, if you have
account names of "administrator" and "goober", you would have crontab
files in the "%SystemRoot%\cron\crontabs" directory of "administrator"
and "goober". Note that, with Windows NT 3.5, you can use long
filenames with the FAT file system. However, we recommend using NTFS
in order to secure the "%SystemRoot%\cron\crontabs" directory. Otherwise,
any user could simply create an "administrator" file in the
"%SystemRoot%\cron\crontabs\" directory, and run any job they
choose! NTFS also provides the ability to mark a file as "owned" by a
account. Future releases of ntcrond will use this attribute.
To schedule a job for ntcrond, smply create the crontab file. In previous
versions of ntcrond, any task that was run would NOT have been shown
on the desktop window. THIS HAS CHANGED WITH THIS RELEASE.
In order to allow ntcrond scheduled tasks to interact with the desktop
window, use the 'Allow Service to Interact with the Desktop' checkbox
under the [Startup...] button in the [Control Panel][Services]
applet. Be warned however, that if you check this box, ANY task that
is scheduled with ntcrond WILL BE DISPLAYED ON THE DESKTOP OF ANY USER
THAT IS CURRENTLY LOGGED ON (at the console only -- not via network
connection). So, if you're scheduling a "eyes-only" task to run, be
careful, because EVERYONE will be able to see it.
If you do NOT check this box, ntcrond will run tasks as previous versions
did -- independant of any desktop window, which raises the same issue
of the previous versions. Namely;
If you schedule a task with ntcrond such as:
* * * * * notepad.exe
ntcrond will start a copy of notepad every minute for as long as your
machine has available memory and swap space (we've tried it...).
However, YOU WILL NEVER SEE IT ON YOUR SCREEN! The reason for this
is how services under Windows NT run. So, as a warning, be VERY
careful WHAT you allow ntcrond to run. Typically, anything that can
be successfully run as a console process is OK to use with ntcrond.
A good rule of thumb to follow is that any task that is "self-terminating"
-- or will run their course, and then exit of their own accord are good
candidates for ntcrond.
A crontab file consists of lines of six fields each. The fields are
separated by spaces or tabs. The first five fields are integer
"patterns" that specify the following:
minute of day (0 - 59)
hour (0 - 23)
day of month (1 - 31)
month of year (1 - 12)
doy of week (0 - 6 where 0=Sunday)
Each of the patterns may be an asterisk "*" meaning ALL allowable values,
or a list of elements separated by commas. An element may be a single
number, or two numbers separated by a minus sign (inclusive range). As
with the UNIX flavor of cron, the specification of "days" can be made by
two fields (day of month and day of week). If both fields are specified
by a list of elements (neither are "*"), then both are adhered to.
For example, the following crontab entry:
0 0 4,20 * 6 somecommand.here
would run the command "somecommand.here" on the 4th and 20th of each
month, as well as on every Saturday (at Midnight). To specify days
by a single field, set the other field to "*". For example, the
following crontab entry:
0 0 * * 6 somecommand.here
will run "somecommand.here" ONLY on Saturdays.
The sixth field in a crontab entry is a string that is executed by
Windows NT.
Additionally, you may use the pound sign "#" anywhere in the crontab
file to indicate a comment. Note, however, that if you have a #
symbol in the middle of the command, or field specifiers, the entry
will not be recognized by ntcrond as a valid line. For example, the
following lines are invalid:
* * # * * * do some command here
* * * * * do some # command here
However, the following lines ARE valid for comments:
* * * * * do some command here # this is a comment
# this is a comment and will not be processed by ntcrond
By default, as does the UNIX flavor of crond, ntcrond will only allow
crontab files that corrospond to valid Windows NT account IDs. For
example, if a Windows NT machine had the following valid accounts:
administrator
goofy
mickey
charliebrown
Only crontab files by those names would EVER be looked at. Although
other filenames may be in the %SystemRoot%\cron\crontabs directory,
ntcrond matches the filename with a list of valid user Accounts
before it runs any entries contained in those files.
--------------------------------------------------------------------------
6. Known Bugs and Limitations
The following is a list of known bugs and problems in the current
release of ntcrond.
Limitation: Unable to do standard out (stdout) redirection from a
crontab file entry
Workaround: If you need to do I/O (file or otherwise) redirection,
simply encapsulate all of the commands into a .cmd file,
and setup the crontab entry to call the .cmd file. For
example:
A crontab entry of:
* * * * * dir d:\*.* > out.dat
will not work. Instead, create a .cmd file with this line,
and run the .cmd.
DOIT.CMD
--------
dir d:\*.* > out.dat
crontab file
------------
* * * * * doit.cmd
Also, see discussion below about ntcrond interaction with
the desktop window...
Limitation: ntcrond does NOT support the use of line continuation
(via the "%" character), and all commands must be on a
single line
Workaround: Again, using the .cmd file method may work, but we're
currently working on this limitation.
Limitation: ntcrond does not support user-level environment variables
Workaround: None available at this point. Microsoft includes header
files for LAN Manager that will allow this, but to date,
we've yet to get them to work.
Limitation: Where's the $%@ crontab.exe?????
Workaround: For now, and in the interest of getting this out to the
huddled masses, all crontab administration must be done
by a member of the "Administrators" group. Of course, you
SHOULD be using the NTFS file system and SHOULD protect
the %SystemRoot%\cron\crontabs directory from prying eyes.
A "crontab.exe" will be forthcomming.
Limitation: There are no "allow.cron" or "deny.cron" files.
Workaround: That is correct. Good observation. These files will not
be used until the "crontab.exe" utility is completed.
--------------------------------------------------------------------------
7. Changes from Previous Versions
[Version 1.0 A1]
- First Release
[Version 1.0 A2]
- ntcrond now interacts with the desktop window if you so desire
- Fixed some VERY obscure memory leaks
- Implemented unicode messages that now appear correctly in Event Viewer
- Added additional semaphores and threading to improve performance
- Fixed a "service stop" error that caused problems on ntcrond stop
- Added "-trace" startup parameter to trace ALL ntcrond operations
(be VERY careful with this as it can chew up memory pretty fast,
and slow down your system...)
--------------------------------------------------------------------------
8. Planned Enhancements
Future enhancements will largely be dictated by the volume of response
this first version of ntcrond generates. Of course the first items to
be "fixed" are described above in Section 6. Other enhancements will
follow as time and funding permits.
--------------------------------------------------------------------------
9. Legal Restrictions
ntcrond License
ntcrond is Copyright (c) 1994 Extreme Software. All Rights Reserved
The Extreme Software ntcrond Version 1.0 Software, both the binary
executable and the source code (hereafter, Software), is copyrighted and
licensed. Extreme Software provides the Software and licenses its use as
set forth herein. The Software is, and at all times shall remain, the
property of Extreme Software, and Licensee shall have no right, title or
interest therein except as expressly set forth in this agreement. Source
code, if made available, will be licensed separately.
Extreme Software grants to Licensee a license to use, copy and distribute
the Software for academic, research and personal-use purposes only,
without a fee, provided that
(i) the above copyright notice and this permission notice appear in all
copies of the Software and related documentation, and
(ii) the Extreme Software name may not be used in any advertising or
publicity relating to the Software without the specific, prior
written permission of Extreme Software, and
(iii) that no charge is associated with copies of the Software distributed
by Licensee to third parties. Commercial use of this Software is
forbidden without the express written permission of Extreme Software
and payment of a negotiable fee.
Any Licensee wishing to make commercial use of the Software should
contact Extreme Software, to negotiate an appropriate license for such
commercial use. Commercial use includes
(1) integration of all or part of the Software into a product for sale
or license by or on behalf of Licensee to third parties, or
(2) distribution of the Software to third parties that need it to utilize
a commercial product sold or licensed by or on behalf of Licensee.
THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, THE IMPLIED WARRANTIES
OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. EXTREME SOFTWARE
DOES NOT WARRANT THAT THE FUNCTIONS CONTAINED IN THE SOFTWARE WILL MEET
LICENSEE'S REQUIREMENTS OR THAT THE OPERATION OF THE SOFTWARE WILL BE
UNINTERRUPTED OR ERROR-FREE. THE ENTIRE RISK AS TO THE QUALITY AND
PERFORMANCE OF THE SOFTWARE IS WITH LICENSEE.
IN NO EVENT WILL EXTREME SOFTWARE BE LIABLE TO LICENSEE OR ANY THIRD
PARTY FOR ANY DAMAGES, INCLUDING ANY LOST PROFITS, LOST SAVINGS OR
OTHER INCIDENTAL, CONSEQUENTIAL OR SPECIAL DAMAGES ARISING OUT OF THE USE
OR INABILITY TO USE THE SOFTWARE EVEN IF EXTREME SOFTWARE HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
By using or copying the Software, Licensee agrees to abide by the
copyright law and all other applicable laws of the U.S. including, but
not limited to, export control laws, and the terms of this license.
Extreme Software shall have the right to terminate this license
immediately by written notice upon Licensee's breach of, or
non-compliance with, any of its terms. Licensee may be held legally
responsible for any copyright infringement that is caused or encouraged
by Licensee's failure to abide by the terms of this license.